Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to show current Node.js version #128

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

imposibrus
Copy link

Possible fix for #97

@rcalabro
Copy link

Is this going to be merged?

@bobthecow
Copy link
Member

In all the other "version" segments (virtualenv, rvm, etc) the segment isn't showing the current version of the language, it's showing the current state of the virtual environment. That this happens to show the language version is a bit irrelevant.

For this to be consistent with those, it would probably show the version supplied by NVM (or other node environment manager), along with any equivalent to ruby bundles.

Additionally, if the current environment version is the "system" or "default", the other language segments don't show at all. This is in keeping with the bobthefish principle that default states should be omitted whenever possible, so that emphasis is placed on what is different, not what is always the same.

So to move forward with this… What is setting your node version?

@rcalabro
Copy link

I think the best option would be to use the active NVM version.

__bobthefish_start_segment $__color_node
set -l node_version (node --version)
echo -ns $__bobthefish_node_glyph
echo -ns $white $node_version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where does $white come from?

@@ -1225,6 +1242,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
set __color_rvm $red $grey --bold
set __color_virtualfish $blue $grey --bold
set __color_virtualgo $blue $grey --bold
set __color_node 026e00 $colorfg --bold
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's no $colorfg here.

@@ -1448,6 +1470,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
set __color_rvm $ruby_red $grey[1] --bold
set __color_virtualfish $blue[2] $grey[1] --bold
set __color_virtualgo $blue[2] $grey[1] --bold
set __color_node 026e00 $colorfg --bold
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's no $colorfg here.

@@ -1486,6 +1509,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
set __color_rvm $red[2] $fg[2] --bold
set __color_virtualfish $blue[2] $fg[2] --bold
set __color_virtualgo $blue[2] $fg[2] --bold
set __color_node 026e00 $colorfg --bold
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's no $colorfg here.

@@ -1525,6 +1549,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
set __color_rvm $ruby_red $grey[1] --bold
set __color_virtualfish $blue[2] $grey[1] --bold
set __color_virtualgo $blue[2] $grey[1] --bold
set __color_node 026e00 $colorfg --bold
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's no $colorfg here.

@alessandro-fazzi alessandro-fazzi mentioned this pull request Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants